// Written by Dale J Williams.
// Licensed under MPL 1.1 unless otherwise specified. 
// http://www.mozilla.org/MPL/MPL-1.1.html

package engineDJW.effects {
		
	/**
	 * ...
	 * @author Dale J Williams
	 */
	public class Particle extends Effect {
		
		private var _life		:int;
		private var _frames		:int;		
		private var _emitter	:ParticleEmitter;
		
		public function Particle($emitter:ParticleEmitter, $life:int) {
			_emitter = $emitter;
			_life = $life;
		}
		
		internal function _count():void {
			_frames++;
			if (_frames >= _life) 
				_emitter.remove(this);
		}
		
		public function get life():int { return _life; }
		
		public function get frames():int { return _frames; }
		
		public function get emitter():ParticleEmitter { return _emitter; }
		
	}

}